#if !defined(COMPUTER_AUDIO_H_)
#define COMPUTER_AUDIO_H_

#include "Param.h"


struct audioSource
{
		pthread_mutex_t Lock;
		
		int  iAudioDelay;
		int  iAudioObjectType;
		int  iAudioSamplingFrequencyIndex;
		int  iAudioChannelConfiguration;
		
		unsigned char data[AUDIO_BUFFER_SIZE];
		int dataSize;
};

static void AudioData(struct audioSource* pAudioSource, unsigned char *pData,int iSize,unsigned int & timestamp);
static int InitAudioSource(struct audioSource **pAudioSource);
static int InitAudio(struct audioSource **pAudioSource);
static int realInitAudio(struct audioSource *pAudioSource);
static void* handleAudioDataThread(void* arg);

int GetSamplingRate(int index);
int initComposedAudioSource();
struct audioSource *GetComposedAudioSource();

#endif
